#pragma once
#include "uilib/uilib.h"
#include "uilib/uibase.h"
#include "pps/codeRate.h"

class CCodeRateButton : public CButtonUI
{
public:
	CCodeRateButton();
	~CCodeRateButton();

public:
	void		setCodeRate(const CoderateInfo& info);
	void		setCodeRate(bool menu, bool current);

public:
	void        DoPaint(HDC hDC, const RECT& rcPaint);
	void        DrawButtonBk(HDC hDC, const RECT& rcItem);
	void		PaintText(HDC hDC);
	SIZE        GetTextSize(HDC hDC, CStdString szText);
	int         GetButtonWidth();
	SIZE        CalcSize(const std::wstring value);

private:
	bool not_menu;
	bool current_coderate;
	CoderateInfo code_rate;
};